{include file="./public/footer" /}
{include file="./public/menu" /}
<!--引入kindeditor编辑器-->
<script src="__STATIC__/Admin/kindeditor/kindeditor-all.js"></script>
<!--/sidebar-->
<!--<style type="text/css">-->
    <!--.nava,.navb,.navc{-->
        <!--display: none;-->
    <!--}-->
    <!--.nav_block{-->
        <!--display: block;-->
    <!--}-->
<!--</style>-->
<div class="main-wrap">

    <div class="crumb-wrap">
        <div class="crumb-list"><i class="icon-font"></i>
            <a href="/admin.php">首页</a>
            <span class="crumb-step">&gt;</span>
            <a class="crumb-name" href="/admin.php/strategy/lists">攻略管理</a>
            <span class="crumb-step">&gt;</span><span>新增攻略</span></div>
    </div>
    <div class="result-wrap">
        <div class="result-content">
            <form  id="andy_form"  name="myform" enctype="multipart/form-data">
                <table class="insert-tab" width="100%">
                    <tbody>
                    <tr class="nav_class_use">
                        <th width="120"><i class="require-red">*</i>所属分类：</th>
                        <td>
                            <select name="nav_class" id="nav_class" class="required" onchange="getWareType(this)">
                                <option value="0">请选择</option>
                                {volist name="nav_class" id="nav_class"}
                                <option value="{$nav_class.id}">{$nav_class.nav_class}</option>
                                {/volist}

                            </select>
                        </td>
                    </tr>
                    <!--111-->
                    <tr id="nava" style="display: none">
                        <th width="120"><i class="require-red">*</i>所属攻略：</th>
                        <td>
                            <select name="nav1_id"  class="required">
                                <option value="">请选择</option>
                                {volist name="nav1" id="nav1"}
                                    <option value="{$nav1.id}">{$nav1.nav}</option>
                                {/volist}
                            </select>
                        </td>
                    </tr>
                    <!--111-->
                    <!--222-->
                    <tr id="navb"  style="display: none">
                        <th width="120"><i class="require-red">*</i>所属攻略：</th>
                        <td>
                            <select name="nav2_id"   class="required">
                                <option value="">请选择</option>
                                {volist name="nav2" id="nav2"}
                                <option value="{$nav2.id}">{$nav2.nav}</option>
                                {/volist}
                            </select>
                        </td>
                    </tr>
                    <!--222-->
                    <!--333-->
                    <tr id="navc"  style="display: none">
                        <th width="120"><i class="require-red">*</i>所属攻略：</th>
                        <td>
                            <select name="nav3_id"   class="required">
                                <option value="">请选择</option>
                                {volist name="nav3" id="nav3"}
                                <option value="{$nav3.id}">{$nav3.nav}</option>
                                {/volist}
                            </select>
                        </td>
                    </tr>
                    <!--333-->
                    <!--444-->
                    <tr id="navd"  style="display: none">
                        <th width="120"><i class="require-red">*</i>所属攻略：</th>
                        <td>
                            <select name="nav4_id"   class="required">
                                <option value="">请选择</option>
                                {volist name="nav4" id="nav4"}
                                <option value="{$nav4.id}">{$nav4.nav}</option>
                                {/volist}
                            </select>
                        </td>
                    </tr>
                    <!--444-->
                    <tr>
                        <th><i class="require-red">*</i>攻略标题：</th>
                        <td>
                            <input class="common-text required"  name="title" size="50"  type="text">
                        </td>
                    </tr>


                    <tr>
                        <th><i class="require-red">*</i>攻略详情：</th>
                        <td><textarea name="content" class="common-textarea"  cols="30" style="width: 98%;" rows="10"></textarea></td>
                    </tr>

                    <tr>
                        <th><i class="require-red">*</i>攻略状态：</th>
                        <td>
                            &nbsp;<input type="radio"  value="1" size="85" name="status" class="common-text" checked>正常&nbsp;&nbsp;&nbsp;&nbsp;
                            &nbsp;<input type="radio" value="0" name="status" size="85" class="commont-text">代审
                        </td>
                    </tr>


                    <tr>
                        <th></th>
                        <td>
                            <input class="btn btn-primary btn6 mr10" id="andy_button_submit" value="提交" type="button">
                            <input class="btn btn6" onclick="history.go(-1)" value="返回" type="button">
                        </td>
                    </tr>
                    </tbody></table>
            </form>
        </div>
    </div>

</div>
<!--/main-->
<script>
    KindEditor.ready(function(K) {
        window.editor = K.create('#kindeditor_id',{
            uploadJson : '/admin.php/image/kindUpload',
            afterBlur: function(){this.sync();}
        });
    });

    var SCOPE = {
        'save_url' : '/admin.php/nav/add',
        'jump_url' : '/admin.php/nav/lists',
    }


    //商品分类方法
    function getWareType(obj){
        var value = $(obj).val();
        if(value == 1){
            $('#nava').show();
            $('#navb').hide();
            $('#navc').hide();
            $('#navd').hide();

        }else if(value == 2){
            $("#navb").show();
            $('#nava').hide();
            $('#navc').hide();
            $('#navd').hide();
        }else if(value == 3){
            $("#navc").show();
            $('#navb').hide();
            $('#nava').hide();
            $('#navd').hide();
        }else if(value == 4){
            $("#navc").hide();
            $('#navb').hide();
            $('#nava').hide();
            $('#navd').show();
        }else if(value == 0){
            $("#navc").hide();
            $('#navb').hide();
            $('#nava').hide();
            $('#navd').hide();
        }

    }
</script>
<script>
</script>
{include file="./public/bottom" /}